//
//  LGNickLabel.h
//  LGNickLabel
//
//  Created by lg on 29/10/2019.
//  Copyright © 2019 lg. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^LGNickLabelConfigImageBlock)(UIImageView *imageView, NSInteger index, NSString *imageUrlOrName);

@protocol LGNickLabelDelegate;

@interface LGNickLabel : UIView

@property (nonatomic,copy) NSString *text; ///<昵称
@property (nonatomic) UIFont *font; ///<字体
@property (nonatomic) NSArray<NSString *> *images; ///<徽章
@property (nonatomic) NSInteger numberOfLines; ///<行数
@property (nonatomic, strong) UIColor *textColor; ///<文本颜色
@property (nonatomic) NSTextAlignment textAlignment; ///<对齐方式

@property (nonatomic) CGSize imageViewSize;///<勋章大小，默认 18x18 pt
@property (nonatomic) CGFloat space;///<徽章和文字的间距，默认 2 pt
@property (nonatomic) CGFloat imageViewSpace;///<徽章之间的间距，默认 2 pt

@property(nonatomic,copy) LGNickLabelConfigImageBlock configImageBlock;

@property(nonatomic,weak) id<LGNickLabelDelegate> delegate;

@end

@protocol LGNickLabelDelegate <NSObject>

- (void)nickLabel:(LGNickLabel *)nickLabel didClickWithIndex:(NSInteger)index;

@end

NS_ASSUME_NONNULL_END
